#include<stdio.h>

int isValid(char *s, int low, int high) {
	if (low == high) return 1;
	if (s[low] == '0') return 0;
	return (
		high - low == 1 ||
		s[low] < '2' ||
		s[low] == '2' && s[low+1] < '5' ||
		s[low] == '2' && s[low+1] == '5' && s[low+2] <= '5'
	);
}

void print(char *s, int length, int point1, int point2, int point3) {
	int i;
	for(i = 0; i <= point1; ++i) {
		putchar(s[i]);
	}
	putchar('.');
	for(; i <= point2; ++i) {
		putchar(s[i]);
	}
	putchar('.');
	for(; i <= point3; ++i) {
		putchar(s[i]);
	}
	putchar('.');
	for(; i < length; ++i) {
		putchar(s[i]);
	}
	puts("");
}

int main() {
	char s[21];
	scanf("%s", s);
	int l = strlen(s);
	int i, j, k; 
	for(i = 0; i < 3 && i < l-3; ++i) {
		if (l-i <= 10 && isValid(s, 0, i)) {
			for(j = i+1; j < i+4 && j < l-2; ++j) {
				if (l-j <= 7 && isValid(s, i+1, j)) {
					for(k = j+1; k < j+4 && k < l-1; ++k) {
						if (l-k <= 4 && isValid(s, j+1, k) && isValid(s, k+1, l-1)) {
							print(s,l,i,j,k);
						}
					}
				}
			}
		}
	}
	return 0;
} 
